<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>js函数</title>
		<script>
			//var a=["dog","pig","grade","cow"];
			var a=[10,44,2,22,44,23];
			//var aa=Math.max.apply(null,a);
			var aa=Math.max.call(a);
			alert(aa);
			function doshow(num=5){
				for(var i=1;i<=num;i++){
					document.write("<h1>good good stuudy.day day up</h1>");
				}
			}
		</script>
	</head>
	<body>
		<!-- <input type="button" value="点击" onclick="doshow()"/> -->
		<input   type="button" value="点击" onclick="doshow(prompt('请输入要循环的\'次数\'',5))"/>
 
	</body>
</html>
